<?php
/**
* @version		$Id:items.php  1 2013-11-05 20:17:56Z  $
* @package		Cash_user
* @subpackage 	Tables
* @copyright	Copyright (C) 2013, . All rights reserved.
* @license #
*/

// no direct access
defined('_JEXEC') or die('Restricted access');

/**
* Jimtawl TableItems class
*
* @package		Cash_user
* @subpackage	Tables
*/
class TableItems extends JTable
{
	
   /** @var int virtuemart_order_item_id- Primary Key  **/
   public $virtuemart_order_item_id = null;

   /** @var varchar virtuemart_order_item_id  **/
   public $virtuemart_order_item_id = null;

   /** @var int created_by  **/
   public $created_by = null;

   /** @var int modified_by  **/
   public $modified_by = null;

   /** @var decimal product_discountedPriceWithoutTax  **/
   public $product_discountedPriceWithoutTax = null;

   /** @var int virtuemart_order_id  **/
   public $virtuemart_order_id = null;

   /** @var smallint virtuemart_vendor_id  **/
   public $virtuemart_vendor_id = "1";

   /** @var int virtuemart_product_id  **/
   public $virtuemart_product_id = null;

   /** @var char order_item_sku  **/
   public $order_item_sku = null;

   /** @var char order_item_name  **/
   public $order_item_name = null;

   /** @var int product_quantity  **/
   public $product_quantity = null;

   /** @var decimal product_item_price  **/
   public $product_item_price = null;

   /** @var decimal product_priceWithoutTax  **/
   public $product_priceWithoutTax = null;

   /** @var decimal product_tax  **/
   public $product_tax = null;

   /** @var decimal product_basePriceWithTax  **/
   public $product_basePriceWithTax = null;

   /** @var decimal product_final_price  **/
   public $product_final_price = "0.00000";

   /** @var decimal product_subtotal_discount  **/
   public $product_subtotal_discount = "0.00000";

   /** @var decimal product_subtotal_with_tax  **/
   public $product_subtotal_with_tax = "0.00000";

   /** @var int order_item_currency  **/
   public $order_item_currency = null;

   /** @var char order_status  **/
   public $order_status = null;

   /** @var text product_attribute  **/
   public $product_attribute = null;

   /** @var datetime created_on  **/
   public $created_on = "0000-00-00 00:00:00";

   /** @var datetime modified_on  **/
   public $modified_on = "0000-00-00 00:00:00";

   /** @var datetime locked_on  **/
   public $locked_on = "0000-00-00 00:00:00";

   /** @var int locked_by  **/
   public $locked_by = null;




	/**
	 * Constructor
	 *
	 * @param object Database connector object
	 * @since 1.0
	 */
	public function __construct(& $db) 
	{
		parent::__construct('#__virtuemart_order_items', 'virtuemart_order_item_id', $db);
	}

	/**
	* Overloaded bind function
	*
	* @acces public
	* @param array $hash named array
	* @return null|string	null is operation was satisfactory, otherwise returns an error
	* @see JTable:bind
	* @since 1.5
	*/
	public function bind($array, $ignore = '')
	{ 
		
		return parent::bind($array, $ignore);		
	}

	/**
	 * Overloaded check method to ensure data integrity
	 *
	 * @access public
	 * @return boolean True on success
	 * @since 1.0
	 */
	public function check()
	{



		/** check for valid name */
		/**
		if (trim($this->virtuemart_order_item_id) == '') {
			$this->setError(JText::_('Your Items must contain a virtuemart_order_item_id.')); 
			return false;
		}
		**/		

		return true;
	}
}
